<!-- Test: Echarts -->
<template>
  <v-chart :options="options" class="echarts" />
  <!-- <v-chart :options="polar"/> -->
</template>

<script>
  export default {
    data () {
      let data = []

      for (let i = 0; i <= 360; i++) {
          let t = i / 180 * Math.PI
          let r = Math.sin(2 * t) * Math.cos(2 * t)
          data.push([r, i])
      }

      return {
        polar: {
          title: {
            text: '极坐标双数值轴'
          },
          legend: {
            data: ['line']
          },
          polar: {
            center: ['50%', '54%']
          },
          tooltip: {
            trigger: 'axis',
            axisPointer: {
              type: 'cross'
            }
          },
          angleAxis: {
            type: 'value',
            startAngle: 0
          },
          radiusAxis: {
            min: 0
          },
          series: [
            {
              coordinateSystem: 'polar',
              name: 'line',
              type: 'line',
              showSymbol: false,
              data: data
            }
          ],
          animationDuration: 2000
        },
        option: {
          title: {
            text: '柱状图数据'
          },
          xAxis: {
            type: 'category',
            data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
          },
          yAxis: {
            type: 'value',
          },
          series: [{
            data: [120, 200, 150, 80, 70, 110, 130],
            type: 'bar',
          }]
        }
      }
    },
    props: {
      options: Object,
    }
  }
</script>

<style lang="scss">
  // .echarts {
  //   width: 1000px;
  //   height: 400px;
  // }
</style>
